1. Field of the Invention
The invention generally relates to computer database systems. More particularly, the invention relates to techniques for delayed firing of database triggers.
2. Description of the Related Art
Databases are well known systems for storing, searching, and retrieving information stored in a computer. The most prevalent type of database used today is the relational database, which stores data using a set of tables that may be reorganized and accessed in a number of different ways. Users access information in relational databases using a relational database management system (DBMS).
In some cases, a table is manipulated by the use of triggers. Triggers are procedures that are defined by users of the DBMS. The DBMS invokes triggers when particular events (associated with the triggers) occur. Specifically, an SQL trigger program is typically written to take some action due to an event, such as an insert, update, or delete operation against an SQL table in a database. For example, in the case of an insert operation, a trigger can be defined such that it is invoked each time a row is inserted into a particular SQL table. A trigger can instruct the system to take any number of actions when a specified change is attempted.
Conventionally, one problem with the use of triggers is that they can result in large demands for database processing, which can impact the overall performance of a system which includes the database. For example, a trigger may be configured to send an email to each person included in a new database record. In the event that a large number of records are being added to the database, the delay caused by sending each person an email can result in a long delay in completing the creation of the new records.
Therefore, there is a need for improved techniques for processing database triggers.